unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, CheckLst,
  StdCtrls, SynEdit, SynHighlighterAny;

type

  { TForm1 }

  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    CheckListBox1: TCheckListBox;
    CheckListBox2: TCheckListBox;
    CheckListBox3: TCheckListBox;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    SynAnySyn1: TSynAnySyn;
    SynEdit1: TSynEdit;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private

  public

  end;

var
  Form1: TForm1;

implementation

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
var i : Integer;
begin
  for i:=0 to 3 do begin
    CheckListBox1.Checked[i]:=True;
    CheckListBox2.Checked[i]:=True;
    CheckListBox3.Checked[i]:=True;
  end;
  SynAnySyn1.KeyWords.Clear;
  SynAnySyn1.KeyWords.Assign(CheckListBox1.Items);
  SynAnySyn1.Objects.Clear;
  SynAnySyn1.Objects.Assign(CheckListBox2.Items);
  SynAnySyn1.Constants.Clear;
  SynAnySyn1.Constants.Assign(CheckListBox3.Items);
  SynEdit1.Refresh;

end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  SynAnySyn1.KeyWords.Clear;
  SynEdit1.Refresh;
end;

initialization
  {$I unit1.lrs}

end.

